package com.huawang.mdesign.model.service.util.reqif;

import com.huawang.mdesign.model.service.util.reqif.ref.DatatypeDefinitionBooleanRef;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamOmitField;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

/**
 * Definition of a boolean attribute.
 *
 * @author xdl
 * @since 2023-04-04
 */
@Getter
@Setter
@XStreamAlias(ReqIFConstants.ATTRIBUTE_DEFINITION_BOOLEAN)
public class AttributeDefinitionBoolean extends AbstractAttributeDefinitionSimple {

    /**
     * Reference to the data type
     */
    @XStreamOmitField
    private DatatypeDefinitionBoolean type;

    @XStreamAlias(ReqIFConstants.TYPE)
    private DatatypeDefinitionBooleanRef typeRef;

    /**
     * Linkage of the owned default value that is used if no attribute value is supplied by the user of the requirements
     * authoring tool.
     */
    @XStreamAlias(ReqIFConstants.DEFAULT_VALUE)
    private List<AttributeValueBoolean> defaultValue = new ArrayList<>();
}
